package cn.sdormitory.attendance.dao;

import cn.sdormitory.attendance.entity.HolidayConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: lx
 * @date: 2023/9/20 14:59
 * @description:
 */
@Mapper
@Component
public interface HolidayConfigDao extends BaseMapper<HolidayConfig> {

    int findRulesPageListCount(@Param("query") HolidayConfig query);

    List<HolidayConfig> findRulesPageList(@Param("query") HolidayConfig query,
                                          @Param("startNum") int startNum,
                                          @Param("pageSize") Integer pageSize);

    List<HolidayConfig> getHolidayByDate(@Param("accessDate")String accessDate);
    
    HolidayConfig getHolidayByDeptIdAndDate(@Param("deptId") String deptId, @Param("accessDate")String accessDate);
}
